1. Field of the Invention
The present invention relates to a technology for detecting and feeding sheets set in a tray in an image forming apparatus.
2. Description of the Related Art
Various apparatuses having print functions have been widely used. Such apparatuses include printers and multi function peripherals (MFP) having a copy function, a facsimile (FAX) function, a print function, and a scan function in one package. A typical MFP generally has a so-called manual sheet feed mode in which a user can set a sheet of a desired size and quality on a sheet feed device such as a tray. Such a sheet feed device generally includes fences in a main-scanning direction (on a front and a rear sides thereof) and a sub-scanning direction (on a left and a right sides thereof) to prevent the set sheets from getting misaligned in the main-scanning direction and the sub-scanning direction.
A technology for performing printing in the manual sheet feed mode is disclosed in, for example, Japanese Patent Application Laid-open No. 2005-178941. In this technology, lengths of sides in the main-scanning direction and the sub-scanning direction of each sheet set on the sheet feed device are detected before starting feeding the sheet, so that sheets of various sizes can be handled in a timely manner.
However, in the conventional technology, the sheet feed device may start feeding a sheet while a user is performing an action for placing a sheet on the sheet feed device, or the user is performing an action for aligning a sheet by using the fences. That is, a sheet may be fed while it is has not accurately been set on the sheet feed device.
Furthermore, when all the sheets in the sheet feed device have been fed, i.e., the sheet feed device becomes empty, and a user places a new sheet on the sheet feed device during the printing, similarly to the above, it may happen that a sheet cannot be accurately set on the sheet feed device.
Moreover, when a user sets a sheet of a wrong size on the sheet feed device when the sheet feed device is empty during the printing, the sheet may be fed to the MFP leading to a paper jam or the like.